package cn.jcet.gumall.product.feign;

import cn.jcet.common.to.SkuReductionTo;
import cn.jcet.common.utils.R;
import cn.jcet.common.to.SpuBoundsTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 1、远程调用接口步骤
 *   1、注册到注册中心
 *   2、调用者接口指明调用服务名称
 *   3、被调用的映射路径
 *   4、主程序包扫描远程接口
 * @author 鲜磊
 * @Date 2020/7/13 21:51
 */
@FeignClient("gulimall-coupon")
public interface CouponFeignService {

    /**
     *  批量保存
     * @param spuBoundsTo
     * @return
     */
    @PostMapping("/coupon/spubounds/save")
    R saveBatchBounds(@RequestBody SpuBoundsTo spuBoundsTo);

    @PostMapping("/coupon/skufullreduction/saveinfo")
    R saveSkuInfo(@RequestBody SkuReductionTo skuReductionTo);
}
